<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<script type="text/javascript">
	var comboData = {
			equipmentProBZCombo:null,//供应商唯一标识值
	}

	$(function() {

		$('#form').form({
			url : '/equipmentProducerController/edit',
			onSubmit : function() {
				parent.$.messager.progress({
					title : '提示',
					text : '数据处理中，请稍后....'
				});
				var isValid = $(this).form('validate');
				if (!isValid) {
					parent.$.messager.progress('close');
				}
				return isValid;
			},
			success : function(result) {
				parent.$.messager.progress('close');
				result = $.parseJSON(result);
				if (result.success) {
					parent.$.modalDialog.openner_dataGrid.datagrid('reload');//之所以能在这里调用到parent.$.modalDialog.openner_treeGrid这个对象，是因为resource.jsp页面预定义好了
					parent.$.modalDialog.handler.dialog('close');
				}else{
					parent.$.messager.alert('提示',result.msg,'info');
				}
			}
		});
		parent.$.messager.progress('close');
		
		/* //得到供应商唯一标识值下拉选项
		$.ajax({
			type:'post',
			url:'/deviceCommController/getDevProBZComboData',
			data:{},
			success:function(result) {
				comboData.equipmentProBZCombo = result.equipmentProBZCombo;
				$('#proBzCode').combobox({
					data : comboData.equipmentProBZCombo,
					valueField:'value',   
				    textField:'text',
				    panelHeight:'auto',
					onLoadSuccess: function(){
						$('#proBzCode').combobox('setValue','${deviceSupplier.proBzCode}');
					}
				});
			},
			dataType:'json'
		}); */
		
		
	});
</script>
<div class="easyui-layout" data-options="fit:true,border:false">
	<div data-options="region:'center',border:false" title="" style="overflow: hidden;">
		<form id="form" method="post">
			<input type="hidden" name="id" value="${deviceSupplier.id }"/>
			<table class="table table-hover table-condensed">
				<tr>
					<th>设备供应商名称</th>
					<td ><input id="name" class="easyui-validatebox" value="${deviceSupplier.name}" name="name" data-options="editable:false,required:true" /></td>
					<th>唯一标识</th>
					<td ><input name="proBzCode" id="proBzCode" type="text" value="${deviceSupplier.proBzCode}"  ></td>
				</tr>
				<tr>
					<th>联系人名称</th>
					<td ><input name="contactPerson" value="${deviceSupplier.contactPerson}"  type="text" placeholder="请输入联系人名称" class="easyui-validatebox span2" data-options="required:true" ></td>
					<th>联系人电话</th>
					<td ><input name="mobile" value="${deviceSupplier.mobile}"  type="text" placeholder="请输入联系人电话" class="easyui-validatebox span2" data-options="required:true" ></td>
				</tr>
				<tr>
					<th>联系人地址</th>
					<td colspan="3"><input id="address" value="${deviceSupplier.address}"  class=""  name="address" style="width: 375px;" data-options="editable:false,required:true" /></td>
				</tr>
				<tr>
					<th>合作时间</th>
					<td><input name="contractTime"  id="contractTime"  placeholder="点击选择时间"   class="easyui-datetimebox" style="width:150px" /></td>
					<th>状态</th>
					<td ><input type="radio" name="proState" value="1">正常 &nbsp;<input type="radio" name="proState"  value="2">冻结</td>
				</tr>
			</table>
		</form>
	</div>
</div>